package start;

import view.ConfigPanel;
import view.DetailEditor;
import view.EventTable;
import view.FilterArea;
import view.FilterCheckBox;
import view.MainFrame;
import model.XMLWorker;

public class Organizer {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// worker
		XMLWorker worker = new XMLWorker();
		worker.readXML("XML/Termindaten2.xml");
		// mainframe
		MainFrame frame = new MainFrame();
		// detailEditor
		DetailEditor d = new DetailEditor(worker);
		frame.setDetailEditor(d);
		// eventTable
		EventTable t = new EventTable(worker, d);
		frame.setEventTable(t);
		// configPanel
		ConfigPanel p = new ConfigPanel(worker, t, d);
		frame.setConfigPanel(p);
		// filterArea
		FilterArea fa = new FilterArea(t);
		frame.setFilterArea(fa);
		// filterCheckBox
//		FilterCheckBox fc = new FilterCheckBox(t);
//		frame.setFilterCheckBox(fc);
		
		// add observer
		worker.logOn(t);
		worker.logOff(d);
		
		// make visible
		frame.setVisible(true);
	}

}
